package cn.wxz1997.permission.controller;

import cn.wxz1997.permission.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.web.DefaultRedirectStrategy;
import org.springframework.security.web.RedirectStrategy;
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
import org.springframework.security.web.savedrequest.RequestCache;
import org.springframework.security.web.savedrequest.SavedRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/**
 * @Description: ${todo}
 * @Author: wxz1997
 * @Date 18-8-5下午8:51
 */
@Slf4j
@RestController
public class LoginController {

    @GetMapping("/login_request")
    public Result loginRequest() {
        log.info("进入login_request");
        return Result.error("请先登录系统");
    }

    @GetMapping("/logout")
    public Result logout()  {
        return Result.success("注销成功");
    }

    @GetMapping("/test")
    public Result test()  {
        return Result.success("test");
    }
}
